package designprinciples.demeter.negative;

/**
 * @program: MyTank
 * @description:
 * @author: 王术平
 * @create: 2021-01-24 15:09
 **/
public class Person {
    public static void main(String[] args) {
        Restaurant re  = new Restaurant();
        re.greenPepperMeat();
        re.tomatoAndEggSoup();
    }
}



//饭店
class Restaurant{
    public void potatoSilk() {
        System.out.println("土豆丝上菜了");
    }

    //青椒肉丝。
    public void greenPepperMeat(){
        System.out.println("青椒肉丝上菜了");
    }
    //番茄蛋汤
    public void tomatoAndEggSoup(){
        System.out.println("番茄蛋汤上菜了");
    }
}
